﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true" CodeFile="Admin_QL_KHACH_HANG.aspx.cs" Inherits="Admin_Admin_QL_SACH" %>

<asp:Content ID="Content1" ContentPlaceHolderID="NoiDung" Runat="Server">
    
    <asp:Panel ID="PanelEdit" runat="server" Visible="False">
        <div class="div-table" style="width:750px; text-align: center;">
            <div class="div-table-row">
                <div class="div-table-col" style="width:200px; vertical-align: top;text-align: left;">
                   Mã: 
                </div>
                <div class="div-table-col" style="width:550px; vertical-align: top;text-align: left;">
                
                    <asp:Label ID="txtId" runat="server"></asp:Label>
                
                </div>
                <div class="div-table-col" style="width:200px; vertical-align: top;text-align: left;">
                   Tên đăng nhập: 
                </div>
                <div class="div-table-col" style="width:550px; vertical-align: top;text-align: left;">
                
                    <asp:Label ID="txtTenDN" runat="server"></asp:Label>
                
                </div>
            </div>
            <div class="div-table-row">
                <div class="div-table-col" style="width:200px; vertical-align: top;text-align: left;">
                    Họ tên:
                </div>
                <div class="div-table-col" style="width:550px; vertical-align: top;text-align: left;">
                
                    <asp:Label ID="txtHoTen" runat="server"></asp:Label>
                
                </div>
            </div>
            <div class="div-table-row">
                <div class="div-table-col" style="width:200px; vertical-align: top;text-align: left;">
                    Email:
                </div>
                <div class="div-table-col" style="width:550px; vertical-align: top;text-align: left;">
                
                    <asp:Label ID="txtEmail" runat="server"></asp:Label>
                
                </div>
            </div>
            <div class="div-table-row">
                <div class="div-table-col" style="width:200px; vertical-align: top;text-align: left;">
                    Địa chỉ:
                </div>
                <div class="div-table-col" style="width:550px; vertical-align: top;text-align: left;">
                
                    <asp:Label ID="txtDiaChi" runat="server"></asp:Label>
                
                </div>
            </div>
            <div class="div-table-row">
                <div class="div-table-col" style="width:200px; vertical-align: top;text-align: left;">
                    Điện thoại:
                </div>
                <div class="div-table-col" style="width:550px; vertical-align: top;text-align: left;">
                
                    <asp:Label ID="txtDienThoai" runat="server"></asp:Label>
                
                </div>
            </div>
            <div class="div-table-row">
                <div class="div-table-col" style="width:200px; vertical-align: top;text-align: left;">
                    Quản trị viên:
                </div>
                <div class="div-table-col" style="width:550px; vertical-align: top;text-align: left;">
                
                    <asp:CheckBox ID="chkQuanTriVien" runat="server" />
                
                </div>
            </div>
            <div class="div-table-row">
                <div class="div-table-col" style="width:200px; vertical-align: top;text-align: left;">
                    Bad user:
                </div>
                <div class="div-table-col" style="width:550px; vertical-align: top;text-align: left;">
                
                    <asp:CheckBox ID="chkBadUser" runat="server" />
                
                </div>
            </div>
            <asp:Button ID="btnLuu" runat="server" Text="Lưu" onclick="btnLuu_Click" />
        </div>
    </asp:Panel>

    <div style="width:750px">
    <asp:gridview runat="server" ID="DS_KhachHang" AllowPaging="True" AutoGenerateColumns="False" 
    Width="750px" onpageindexchanging="DS_KhachHang_PageIndexChanging" 
        onsorting="DS_KhachHang_Sorting" DataSourceID="ObjectDataSourceKhachHang" 
        CellPadding="4" ForeColor="#333333" GridLines="None" ShowFooter="True" 
        style="margin-right: 0px" DataKeyNames="idUser" 
            onselectedindexchanged="DS_KhachHang_SelectedIndexChanged">
        <AlternatingRowStyle BackColor="White" />
        <Columns>
            <asp:BoundField DataField="idUser" SortExpression="idUser" 
                ReadOnly="True" HeaderText="Mã"></asp:BoundField>
            <asp:BoundField DataField="tenDangNhap" HeaderText="Tên đăng nhập" 
                SortExpression="tenDangNhap" ReadOnly="True"></asp:BoundField>
            <asp:BoundField DataField="matKhau" SortExpression="matKhau" Visible="False" 
                ReadOnly="True"></asp:BoundField>
            <asp:BoundField DataField="hoTen" HeaderText="Họ tên" 
                SortExpression="hoTen" ReadOnly="True">
            <ItemStyle Width="40%" />
            </asp:BoundField>
            <asp:BoundField DataField="email" HeaderText="Email" SortExpression="email" 
                ReadOnly="True">
            <ItemStyle Width="10%" />
            </asp:BoundField>
            <asp:BoundField DataField="diaChi" HeaderText="Địa chỉ" 
                SortExpression="diaChi" ReadOnly="True">
            <ItemStyle Width="30%" />
            </asp:BoundField>
            <asp:BoundField DataField="dienThoai" HeaderText="Điện thoại" 
                SortExpression="dienThoai" ReadOnly="True" />
            <asp:CheckBoxField HeaderText="Quản trị viên" DataField="laQuanTri" 
                SortExpression="laQuanTri">
            <ItemStyle Width="5%" />
            </asp:CheckBoxField>
            <asp:CheckBoxField DataField="laUserXau" HeaderText="Bad user" 
                SortExpression="laUserXau" >
            <ItemStyle Width="5%" />
            </asp:CheckBoxField>
            <asp:BoundField DataField="taiKhoan" HeaderText="Tài khoản" 
                SortExpression="taiKhoan" ReadOnly="True" Visible="False" />
            <asp:CommandField ButtonType="Button" SelectText="Chọn" 
                ShowSelectButton="True" />
            <asp:CommandField ButtonType="Image" DeleteImageUrl="~/Hinh/Delete.jpg" 
                ShowDeleteButton="True" />
        </Columns>
        <EditRowStyle BackColor="#7C6F57" />
        <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#E3EAEB" />
        <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#F8FAFA" />
        <SortedAscendingHeaderStyle BackColor="#246B61" />
        <SortedDescendingCellStyle BackColor="#D4DFE1" />
        <SortedDescendingHeaderStyle BackColor="#15524A" />
    </asp:gridview>
</div>
    
    <asp:ObjectDataSource ID="ObjectDataSourceKhachHang" runat="server" 
        SelectMethod="getListKhachHangAll" TypeName="Biz_Dal.Biz.BizKhachHang" 
        DataObjectTypeName="Biz_Dal.Biz.BizKhachHang" 
        InsertMethod="insertKhachHang" DeleteMethod="deleteKhachHang" 
        OldValuesParameterFormatString="original_{0}">
        <DeleteParameters>
            <asp:Parameter Name="idDalKhachHangachHang" Type="Int32" />
        </DeleteParameters>
    </asp:ObjectDataSource>
</asp:Content>

